package com.dq;

import com.mybatis.Param;
import com.mybatis.Select;

import java.util.List;

/**
 * @ClassName UserMapper
 * @Description mapper层
 * @Author DuX1aoQiang
 * @Date 2023/5/22 11:00
 * @Version 1.0
 */
public interface UserMapper {
    // 为啥使用#{name}  因为name可以复用 这才是灵活的sdk
    @Select("select * from user where name = #{name}")
    public List<User> getUserList(@Param("name") String name);

    @Select("select id from user where id = #{id}")
    public User getUserById(@Param("id")Integer id);
}
